package com.ruoyi.shop.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shop.mapper.CheckMapper;
import com.ruoyi.shop.domain.Check;
import com.ruoyi.shop.service.ICheckService;

/**
 * 店铺审核Service业务层处理
 *

 * @date 2023-07-23
 */
@Service
public class CheckServiceImpl implements ICheckService
{
    @Autowired
    private CheckMapper checkMapper;

    /**
     * 查询店铺审核
     *
     * @param id 店铺审核主键
     * @return 店铺审核
     */
    @Override
    public Check selectCheckById(Long id)
    {
        return checkMapper.selectCheckById(id);
    }

    /**
     * 查询店铺审核列表
     *
     * @param check 店铺审核
     * @return 店铺审核
     */
    @Override
    public List<Check> selectCheckList(Check check)
    {
        return checkMapper.selectCheckList(check);
    }

    /**
     * 新增店铺审核
     *
     * @param check 店铺审核
     * @return 结果
     */
    @Override
    public int insertCheck(Check check)
    {
        check.setCreateTime(DateUtils.getNowDate());
        return checkMapper.insertCheck(check);
    }

    /**
     * 修改店铺审核
     *
     * @param check 店铺审核
     * @return 结果
     */
    @Override
    public int updateCheck(Check check)
    {
        return checkMapper.updateCheck(check);
    }

    /**
     * 批量删除店铺审核
     *
     * @param ids 需要删除的店铺审核主键
     * @return 结果
     */
    @Override
    public int deleteCheckByIds(Long[] ids)
    {
        return checkMapper.deleteCheckByIds(ids);
    }

    /**
     * 删除店铺审核信息
     *
     * @param id 店铺审核主键
     * @return 结果
     */
    @Override
    public int deleteCheckById(Long id)
    {
        return checkMapper.deleteCheckById(id);
    }
}
